package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;

/**
 * @Description UserMapper
 * @Author zhuzi
 * @Date 2023/10/01
 */
@Mapper
public interface UserMapper {

    /**
     * 根据openid获取用户
     *
     * @param openid String
     * @return User
     */
    User getUserByOpenid(String openid);

    /**
     * 新增用户
     *
     * @param user User
     */
    void createUser(User user);

    /**
     * 根据用户id获取用户信息
     *
     * @param userId Long
     * @return User
     */
    User getUserByUserId(Long userId);

}
